Python Calculate Autocorrelation